import pymysql


try:
    conn = pymysql.connect(  #连接数据库
        host="127.0.0.1",
        user="root", password="",
        database="pdd",
        charset="utf8")

    cursor = conn.cursor()  # 数据的游标
    # cursor.execute("select * from pdd_goods_list")  #查询

    # cursor.execute("insert into pdd_detail values('1037201811','2018-09-13/03fab2ade51542225d661b9cb45efb9d.jpeg')")
    # conn.commit() #插入语句生效

    # data = cursor.fetchall()  # 查询的结果
    # print(data)           #输出结果
    print("密码正确")
    conn.close()
except:
    print("密码错误")
    

